<?php

namespace Fendx\Exception;

use Throwable;

/**
 * 框架异常基础类
 * 框架所有异常都会继承此类
 * Class FendxException
 * @package Fendx\Exception
 */
class FendxException extends \Exception
{
    public function __construct($message = "", $code = 500, Throwable $previous = null)
    {
        parent::__construct($message, $code, $previous);
        if ($previous) {
            $this->line = $previous->getLine();
            $this->file = $previous->getFile();
        }
    }
}
